home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / fpc225_3.zip / F-PCHELP.ZIP / HANDLES.HLP < prev    next >
Text File  |  1987-12-21  |  5KB  |  136 lines

  1. HANDLES.HLP     Hnadles documentation
  2.  
  3. handle          ( | name --- )
  4.         creates an array/handle for name, which holds the files
  5.         attributes, handle number, and null terminated name.
  6.  
  7. >attrib         ( handle --- attrib-addr )
  8.         Step to the attribute field of the handle
  9.  
  10. >hndle          ( handle --- handle-addr )
  11.         Step to the handel storage field of the handle array.
  12.  
  13. >nam            ( handle --- name-string-addr )
  14.         Step to the null terminated name field of the handle
  15.  
  16. FILE1           ( --- a1 )
  17. FILE2           ( --- a1 )
  18.         Define a couple of handles for testing
  19.  
  20. DEFEXT          ( --- a1 )
  21.         An array holding the default extention "SEQ".
  22.  
  23. ?DEF.EXT        ( --- )
  24.         If the specified file name has no "." indicating the
  25.         extension, then supply one from the default.
  26.  
  27. $>handle        ( filename1  handle1 --- )
  28.         Move a counted filename1 string into handle1 for use by
  29.         the following words.
  30.  
  31. !HCB            ( a1 | name --- )
  32.         Get "name" from the input stream and move it into the handle a1.
  33.  
  34. FCB>HANDLE      ( a1 a2 --- )
  35.         Copy the file name and extention from the specified FCB a1 to
  36.         handle a2.
  37.  
  38. HANDLE>EXT      ( a1 --- a2 )
  39.         Moves the address from the handle to the decimal point in the
  40.         filename, if it exists.  Otherwise it steps to the null
  41.         immediately following the filename.
  42.  
  43. $>EXT           ( a1 n1 a2 --- )
  44.         Move the specified string a1,n1 to the extension field of the
  45.         handle a2.
  46.  
  47. hdos1           ( cx dx fun -- ax cf | error-code 1 )
  48.         Define a dos call assembly word, which is later used by
  49.         HOPEN and HCREATE.
  50.  
  51. HDOS3   Yet another DOS call.
  52. HDOS4   Still another native DOS call.
  53.  
  54. MovePointer     ( double-offset handle --- )
  55.         Move the file pointer for handle to the position
  56.         double-offset in the file already open in handle.
  57.  
  58. EndFile         ( handle --- double-end )
  59.         Return the double-end pointer for the file open in
  60.         handle, also sets the pointer to the end of the file.
  61.         Useful for finding the end of a file, and for appending
  62.         to the end of a file.
  63.  
  64. PATHSET         ( handle --- f1 )
  65.         Set the current drive path into handle. returns boolean f1
  66.         true if an error occured while performing this operation.
  67.  
  68. <HRENAME>
  69.         Code primitive for the HRENAME function below.
  70.  
  71. hrename         ( handle1 handle2 --- return-code )
  72.         Change the name of the file specified in handle1 to the
  73.         name specified in handle2. Can be used to move a file
  74.         from one directory to another on the same drive.
  75.         Returns 18 if the rename was good, not zero.
  76.  
  77. hcreate         ( handle --- error-code )
  78.         Create the file specified in handle, if the file already
  79.         exists, then it is ZEROed !! Returns zero if no error
  80.         occured.
  81.  
  82.         The file is automatically opened for read and write
  83.         operations.
  84.  
  85. hopen           ( handle --- error-code )
  86.         Open the file specified in handle, return error-code
  87.         zero if the file was opened properly.
  88.  
  89.         The file is opened for both read and write operations.
  90.  
  91. rwmode          ( --- a1 )
  92.         the variable rwmode, which defaults to a value of 2,
  93.         controls the read write mode of the file being opened,
  94.         the value 2 is read, or write, a value of 1 specifies
  95.         write only, and a value of 0 specifies read only.
  96.  
  97. HCLOSE          ( handle --- f1 )
  98.         Close the file specified by handle, return bool f1
  99.         non-zero if an error occured.
  100.  
  101. HDELETE         ( handle --- f1 )
  102.         Delete the file specified by handle, return bool f1
  103.         non-zero if an error occured.
  104.  
  105. EXHREAD         ( a1 n1 handle seg1 --- n2 )
  106.         Read from the file specified by handle to the extended segment
  107.         area specified by seg1, a1 for length n1. Returns n2 the
  108.         length actually read.
  109.  
  110. EXHWRITE        ( a1 n1 handle seg1 --- )
  111.         Write from memory a1,n1 in segment seg1 to the file specified
  112.         by handle.
  113.  
  114. HWRITE          ( a1 n1 handle --- n2 )
  115.         Write to a file specified by a handle from a1,n1 in the code
  116.         segment. Return n2 the length actually written.
  117.  
  118. HREAD           ( a1 n1 handle --- n2 )
  119.         Read from a file specified by a handle to a1,n1 in the
  120.         code segment.  Returns n2 the length actually read.
  121.  
  122. FINDFIRST       ( string --- f1 )
  123.         Begin a search for files specified by filespec string.
  124.         String is a null terminated un-counted string. F1 returned
  125.         indicates whether any files matched. The found file is placed
  126.         in the Data Transfer Area (DTA).
  127.  
  128.  
  129. FINDNEXT        ( --- f1 )
  130.         Continue the file search for a specified string. Returns
  131.         the bool f1 true if another match was found.
  132.  
  133. SET-DTA         ( a1 --- )
  134.         Set the Disk Transfer Area as a1.
  135.  
  136.